package io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class WriterStringDemo {
    public static void main(String[] args) throws IOException {
//        FileOutputStream fos=new FileOutputStream("fos.txt",true);追加
        FileOutputStream fos=new FileOutputStream("fos.txt");
        String line="心在跳是爱情如烈火，你在笑疯狂的人是我";
        byte[]data=line.getBytes(StandardCharsets.UTF_8);
        fos.write(data);
//        fos.write("ioeiofo".getBytes(StandardCharsets.UTF_8));追加
        System.out.println("转入完毕");
        fos.close();
    }
}
